<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>PU2CLR RDA5807 Arduino Library: Basic Functions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectlogo"><img alt="Logo" src="LOGO.png"/></td>
  <td id="projectalign">
   <div id="projectname">PU2CLR RDA5807 Arduino Library<span id="projectnumber">&#160;1.1.8</span>
   </div>
   <div id="projectbrief">Arduino Library for RDA5807 Devices - By Ricardo Lima Caratti</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('group___g_a02.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle"><div class="title">Basic Functions</div></div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga1db36d126d26a553668c1b70de9b3823"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_a02.html#ga1db36d126d26a553668c1b70de9b3823">RDA5807::setDelayAfterCrystalOn</a> (uint8_t ms_value)</td></tr>
<tr class="memdesc:ga1db36d126d26a553668c1b70de9b3823"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the Delay After Crystal On (default 500ms)  <br /></td></tr>
<tr class="separator:ga1db36d126d26a553668c1b70de9b3823"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadf634cb6733022e30d8f1a74a5946e78"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_a02.html#gadf634cb6733022e30d8f1a74a5946e78">RDA5807::setI2CBusAddrs</a> (int directAccess, int fullAccess)</td></tr>
<tr class="memdesc:gadf634cb6733022e30d8f1a74a5946e78"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets alternatives I2C bus address.  <br /></td></tr>
<tr class="separator:gadf634cb6733022e30d8f1a74a5946e78"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga677eff1084b294696a32e3ca4dfe593b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_a02.html#ga677eff1084b294696a32e3ca4dfe593b">RDA5807::setGpio</a> (uint8_t gpioPin, uint8_t gpioSetup=0, int mcuPin=-1)</td></tr>
<tr class="memdesc:ga677eff1084b294696a32e3ca4dfe593b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the Device GPIO pins.  <br /></td></tr>
<tr class="separator:ga677eff1084b294696a32e3ca4dfe593b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabd676c0e4ad20c6152a68f8daba64cb3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_a02.html#gabd676c0e4ad20c6152a68f8daba64cb3">RDA5807::setInterruptMode</a> (uint8_t value)</td></tr>
<tr class="memdesc:gabd676c0e4ad20c6152a68f8daba64cb3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets Interrupt Mode.  <br /></td></tr>
<tr class="separator:gabd676c0e4ad20c6152a68f8daba64cb3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab9e3a5584a6238f719e9c9e49435f5ce"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_a02.html#gab9e3a5584a6238f719e9c9e49435f5ce">RDA5807::getStatusRegisters</a> ()</td></tr>
<tr class="memdesc:gab9e3a5584a6238f719e9c9e49435f5ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets all current device status and RDS information registers (From 0x0A to 0x0F)  <br /></td></tr>
<tr class="separator:gab9e3a5584a6238f719e9c9e49435f5ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga69981ef141e22ab00e4bde3f18f84964"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___g_a01.html#unionword16__to__bytes">word16_to_bytes</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_a02.html#ga69981ef141e22ab00e4bde3f18f84964">RDA5807::getDirectRegister</a> (uint8_t reg)</td></tr>
<tr class="memdesc:ga69981ef141e22ab00e4bde3f18f84964"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the register content via direct access.  <br /></td></tr>
<tr class="separator:ga69981ef141e22ab00e4bde3f18f84964"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1f4bc3d6f9d94171b2965dbb4e812f4f"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_a02.html#ga1f4bc3d6f9d94171b2965dbb4e812f4f">RDA5807::getStatus</a> (uint8_t reg)</td></tr>
<tr class="memdesc:ga1f4bc3d6f9d94171b2965dbb4e812f4f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the register content of a given status register (from 0x0A to 0x0F)  <br /></td></tr>
<tr class="separator:ga1f4bc3d6f9d94171b2965dbb4e812f4f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3b581b82ab8c631cfec537a47008ddf3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_a02.html#ga3b581b82ab8c631cfec537a47008ddf3">RDA5807::setRegister</a> (uint8_t reg, uint16_t value)</td></tr>
<tr class="memdesc:ga3b581b82ab8c631cfec537a47008ddf3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets a given value to a specific device register.  <br /></td></tr>
<tr class="separator:ga3b581b82ab8c631cfec537a47008ddf3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3fe1feed45d3290beba0efef491128e6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_a02.html#ga3fe1feed45d3290beba0efef491128e6">RDA5807::waitAndFinishTune</a> ()</td></tr>
<tr class="memdesc:ga3fe1feed45d3290beba0efef491128e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Waits for Seek or Tune finish.  <br /></td></tr>
<tr class="separator:ga3fe1feed45d3290beba0efef491128e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3f6dace4c93f82ec66da5641e3e3fdaa"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_a02.html#ga3f6dace4c93f82ec66da5641e3e3fdaa">RDA5807::softReset</a> ()</td></tr>
<tr class="memdesc:ga3f6dace4c93f82ec66da5641e3e3fdaa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Resets the device.  <br /></td></tr>
<tr class="separator:ga3f6dace4c93f82ec66da5641e3e3fdaa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga30d2b0c4662922df53bcef118663329c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_a02.html#ga30d2b0c4662922df53bcef118663329c">RDA5807::powerUp</a> ()</td></tr>
<tr class="memdesc:ga30d2b0c4662922df53bcef118663329c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Powers the receiver on.  <br /></td></tr>
<tr class="separator:ga30d2b0c4662922df53bcef118663329c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab97c1c8ad3ab0cd5d2852f712caee0a1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_a02.html#gab97c1c8ad3ab0cd5d2852f712caee0a1">RDA5807::setNewDemodulateMethod</a> (bool value)</td></tr>
<tr class="memdesc:gab97c1c8ad3ab0cd5d2852f712caee0a1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets new demodulate method. It can improve the receiver sensitivity about 1dB.  <br /></td></tr>
<tr class="separator:gab97c1c8ad3ab0cd5d2852f712caee0a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga214f631aef72ece69db73c99879c7c46"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_a02.html#ga214f631aef72ece69db73c99879c7c46">RDA5807::powerDown</a> ()</td></tr>
<tr class="memdesc:ga214f631aef72ece69db73c99879c7c46"><td class="mdescLeft">&#160;</td><td class="mdescRight">Power the receiver off.  <br /></td></tr>
<tr class="separator:ga214f631aef72ece69db73c99879c7c46"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga272444216a784ea5317c83783eb2bfe7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_a02.html#ga272444216a784ea5317c83783eb2bfe7">RDA5807::setup</a> (uint8_t clock_frequency=<a class="el" href="_r_d_a5807_8h.html#aaaa8a7748321c8739d938babeb67d8e9">CLOCK_32K</a>, uint8_t oscillator_type=<a class="el" href="_r_d_a5807_8h.html#a0941eab712587842e5513eb6cd562717">OSCILLATOR_TYPE_PASSIVE</a>, uint8_t rlck_no_calibrate=<a class="el" href="_r_d_a5807_8h.html#acf26b27b8292674e78e04908e3c27bff">RLCK_NO_CALIBRATE_MODE_OFF</a>)</td></tr>
<tr class="memdesc:ga272444216a784ea5317c83783eb2bfe7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Starts the device.  <br /></td></tr>
<tr class="separator:ga272444216a784ea5317c83783eb2bfe7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad1d589d43adc89a93c5e07b2d4cb6a4c"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_a02.html#gad1d589d43adc89a93c5e07b2d4cb6a4c">RDA5807::getDeviceId</a> ()</td></tr>
<tr class="memdesc:gad1d589d43adc89a93c5e07b2d4cb6a4c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the Device identification.  <br /></td></tr>
<tr class="separator:gad1d589d43adc89a93c5e07b2d4cb6a4c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<h1><a class="anchor" id="GA02"></a>
Basic Functions</h1>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga1db36d126d26a553668c1b70de9b3823" name="ga1db36d126d26a553668c1b70de9b3823"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1db36d126d26a553668c1b70de9b3823">&#9670;&#160;</a></span>setDelayAfterCrystalOn()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void RDA5807::setDelayAfterCrystalOn </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>ms_value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the Delay After Crystal On (default 500ms) </p>
<p>Minimum time required for the oscillator to become stable </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ms_value</td><td>Value in milliseconds </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="_r_d_a5807_8h_source.html#l00632">632</a> of file <a class="el" href="_r_d_a5807_8h_source.html">RDA5807.h</a>.</p>

</div>
</div>
<a id="gadf634cb6733022e30d8f1a74a5946e78" name="gadf634cb6733022e30d8f1a74a5946e78"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gadf634cb6733022e30d8f1a74a5946e78">&#9670;&#160;</a></span>setI2CBusAddrs()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void RDA5807::setI2CBusAddrs </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>directAccess</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>fullAccess</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sets alternatives I2C bus address. </p>
<p>You do not need use this function on RDA5807M </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">directAccess</td><td></td></tr>
    <tr><td class="paramname">fullAccess</td><td></td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="_r_d_a5807_8h_source.html#l00641">641</a> of file <a class="el" href="_r_d_a5807_8h_source.html">RDA5807.h</a>.</p>

<p class="reference">References <a class="el" href="_r_d_a5807_8h_source.html#l00606">RDA5807::deviceAddressDirectAccess</a>, and <a class="el" href="_r_d_a5807_8h_source.html#l00607">RDA5807::deviceAddressFullAccess</a>.</p>

</div>
</div>
<a id="ga677eff1084b294696a32e3ca4dfe593b" name="ga677eff1084b294696a32e3ca4dfe593b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga677eff1084b294696a32e3ca4dfe593b">&#9670;&#160;</a></span>setGpio()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void RDA5807::setGpio </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>gpioPin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>gpioSetup</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>mcuPin</em> = <code>-1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the Device GPIO pins. </p>
<p>This method is useful to add control to the system via GPIO RDA devive pins.</p>
<p>For example: You can use these pins to control RDS and SEEK via interrupt.</p>
<p>GPIOs are General Purpose I/O pin.</p>
<p>GPIO setup</p>
<p>When GPIO1 (#1), gpioSetup can be: 00 = High impedance; 01 = Reserved; 10 = Low; 11 = High</p>
<p>When GPIO2 (#2), gpioSetup can be: 00 = High impedance; 01 = Interrupt (INT) 10 = Low; 11 = High</p>
<p>When GPIO3 (#3), gpioSetup can be: 00 = High impedance; 01 = Mono/Stereo indicator (ST) = Low; 11 = High</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">gpioPin</td><td>gpio number (1, 2 or 3) </td></tr>
    <tr><td class="paramname">gpioSetup</td><td>See description above </td></tr>
    <tr><td class="paramname">mcuPip</td><td>MCU (Arduino) pin connected to the gpio </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="_r_d_a5807_8cpp_source.html#l00034">34</a> of file <a class="el" href="_r_d_a5807_8cpp_source.html">RDA5807.cpp</a>.</p>

</div>
</div>
<a id="gabd676c0e4ad20c6152a68f8daba64cb3" name="gabd676c0e4ad20c6152a68f8daba64cb3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gabd676c0e4ad20c6152a68f8daba64cb3">&#9670;&#160;</a></span>setInterruptMode()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void RDA5807::setInterruptMode </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets Interrupt Mode. </p>
<p>GPIO2 could be programmed to output a low interrupt (interrupt will be generated only with interrupt enable bit STCIEN is set to high) when seek/tune process completes</p>
<p>Setting STCIEN = 1 will generate a low pulse on GPIO2 when the interrupt occurs.</p>
<p>ATTENTION: This function affects the behavior of the GPIO2 pin. The register 0x04 GPIO2 attribute will be setted to 1 </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>0 = disable; 1 = enqble </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group___g_a02.html#ga677eff1084b294696a32e3ca4dfe593b" title="Sets the Device GPIO pins.">setGpio</a> </dd></dl>

<p class="definition">Definition at line <a class="el" href="_r_d_a5807_8cpp_source.html#l00065">65</a> of file <a class="el" href="_r_d_a5807_8cpp_source.html">RDA5807.cpp</a>.</p>

</div>
</div>
<a id="gab9e3a5584a6238f719e9c9e49435f5ce" name="gab9e3a5584a6238f719e9c9e49435f5ce"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab9e3a5584a6238f719e9c9e49435f5ce">&#9670;&#160;</a></span>getStatusRegisters()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void RDA5807::getStatusRegisters </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets all current device status and RDS information registers (From 0x0A to 0x0F) </p>
<dl class="section see"><dt>See also</dt><dd>RDA5807M - SINGLE-CHIP BROADCAST FMRADIO TUNER; pages 5, 9, 12 and 13. </dd>
<dd>
<a class="el" href="group___g_a01.html#unionrda__reg0a" title="Register 0x0A - Device current status.">rda_reg0a</a>, <a class="el" href="group___g_a01.html#unionrda__reg0b" title="Register 0x0B.">rda_reg0b</a>, <a class="el" href="group___g_a01.html#unionrda__reg0c" title="Register 0x0C.">rda_reg0c</a>, <a class="el" href="group___g_a01.html#unionrda__reg0d" title="Register 0x0D.">rda_reg0d</a>, <a class="el" href="group___g_a01.html#unionrda__reg0e" title="Register 0x0E.">rda_reg0e</a>, <a class="el" href="group___g_a01.html#unionrda__reg0f" title="Register 0x0F.">rda_reg0f</a> </dd>
<dd>
<a class="el" href="group___g_a01.html#ae51bb0aaf958ee320da80866bb20ffb5" title="shadow status registers">shadowStatusRegisters</a>; </dd></dl>

<p class="definition">Definition at line <a class="el" href="_r_d_a5807_8cpp_source.html#l00079">79</a> of file <a class="el" href="_r_d_a5807_8cpp_source.html">RDA5807.cpp</a>.</p>

<p class="reference">Referenced by <a class="el" href="_r_d_a5807_8cpp_source.html#l00822">RDA5807::getRdsReady()</a>.</p>

</div>
</div>
<a id="ga69981ef141e22ab00e4bde3f18f84964" name="ga69981ef141e22ab00e4bde3f18f84964"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga69981ef141e22ab00e4bde3f18f84964">&#9670;&#160;</a></span>getDirectRegister()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___g_a01.html#unionword16__to__bytes">word16_to_bytes</a> RDA5807::getDirectRegister </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>reg</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets the register content via direct access. </p>
<p>this method is useful to deal with a specific register. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">uint8_t</td><td>register number </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group___g_a01.html#unionword16__to__bytes" title="Converts 16 bits word to two bytes.">word16_to_bytes</a> register content </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group___g_a01.html#unionword16__to__bytes" title="Converts 16 bits word to two bytes.">word16_to_bytes</a> datatype in <a class="el" href="_r_d_a5807_8h.html">RDA5807.h</a> </dd></dl>

<p class="definition">Definition at line <a class="el" href="_r_d_a5807_8cpp_source.html#l00102">102</a> of file <a class="el" href="_r_d_a5807_8cpp_source.html">RDA5807.cpp</a>.</p>

</div>
</div>
<a id="ga1f4bc3d6f9d94171b2965dbb4e812f4f" name="ga1f4bc3d6f9d94171b2965dbb4e812f4f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1f4bc3d6f9d94171b2965dbb4e812f4f">&#9670;&#160;</a></span>getStatus()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void * RDA5807::getStatus </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>reg</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets the register content of a given status register (from 0x0A to 0x0F) </p>
<p>Useful when you need just a specific status register content.</p>
<p>This methos update the first element of the shadowStatusRegisters linked to the register </p><dl class="section return"><dt>Returns</dt><dd>rdax_reg0a the reference to current value of the 0x0A register. </dd></dl>

<p class="definition">Definition at line <a class="el" href="_r_d_a5807_8cpp_source.html#l00124">124</a> of file <a class="el" href="_r_d_a5807_8cpp_source.html">RDA5807.cpp</a>.</p>

</div>
</div>
<a id="ga3b581b82ab8c631cfec537a47008ddf3" name="ga3b581b82ab8c631cfec537a47008ddf3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3b581b82ab8c631cfec537a47008ddf3">&#9670;&#160;</a></span>setRegister()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void RDA5807::setRegister </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>reg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets a given value to a specific device register. </p>
<dl class="section see"><dt>See also</dt><dd>RDA5807M - SINGLE-CHIP BROADCAST FMRADIO TUNER; pages 5, 9, 10 and 11. </dd>
<dd>
<a class="el" href="group___g_a01.html#unionrda__reg02" title="Register 0x02 - Basic setup: RESET configuration;.">rda_reg02</a>, <a class="el" href="group___g_a01.html#unionrda__reg03" title="Register 0x03.">rda_reg03</a>, <a class="el" href="group___g_a01.html#unionrda__reg04" title="Register 0x04.">rda_reg04</a>, <a class="el" href="group___g_a01.html#unionrda__reg05" title="Register 0x05.">rda_reg05</a>, <a class="el" href="group___g_a01.html#unionrda__reg06" title="Register 0x06.">rda_reg06</a>, <a class="el" href="group___g_a01.html#unionrda__reg07" title="Register 0x07.">rda_reg07</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">reg</td><td>register number (valid values is between 0x02 and 0x07) </td></tr>
    <tr><td class="paramname">value</td><td>the unsigned 16 bits word value (see rda_rec0x data types) </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="_r_d_a5807_8cpp_source.html#l00154">154</a> of file <a class="el" href="_r_d_a5807_8cpp_source.html">RDA5807.cpp</a>.</p>

</div>
</div>
<a id="ga3fe1feed45d3290beba0efef491128e6" name="ga3fe1feed45d3290beba0efef491128e6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3fe1feed45d3290beba0efef491128e6">&#9670;&#160;</a></span>waitAndFinishTune()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void RDA5807::waitAndFinishTune </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Waits for Seek or Tune finish. </p>

<p class="definition">Definition at line <a class="el" href="_r_d_a5807_8cpp_source.html#l00173">173</a> of file <a class="el" href="_r_d_a5807_8cpp_source.html">RDA5807.cpp</a>.</p>

<p class="reference">Referenced by <a class="el" href="_r_d_a5807_8cpp_source.html#l00559">RDA5807::seek()</a>, and <a class="el" href="_r_d_a5807_8cpp_source.html#l00338">RDA5807::setChannel()</a>.</p>

</div>
</div>
<a id="ga3f6dace4c93f82ec66da5641e3e3fdaa" name="ga3f6dace4c93f82ec66da5641e3e3fdaa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3f6dace4c93f82ec66da5641e3e3fdaa">&#9670;&#160;</a></span>softReset()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void RDA5807::softReset </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Resets the device. </p>
<p>The RDA5807M is RESET itself When VIO is Power up.</p>
<p>Also, it support soft reset by triggering the 0x02 register (<a class="el" href="group___g_a01.html#unionrda__reg02" title="Register 0x02 - Basic setup: RESET configuration;.">rda_reg02</a>) bit 1 from 0 to 1. </p>

<p class="definition">Definition at line <a class="el" href="_r_d_a5807_8cpp_source.html#l00187">187</a> of file <a class="el" href="_r_d_a5807_8cpp_source.html">RDA5807.cpp</a>.</p>

</div>
</div>
<a id="ga30d2b0c4662922df53bcef118663329c" name="ga30d2b0c4662922df53bcef118663329c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga30d2b0c4662922df53bcef118663329c">&#9670;&#160;</a></span>powerUp()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void RDA5807::powerUp </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Powers the receiver on. </p>

<p class="definition">Definition at line <a class="el" href="_r_d_a5807_8cpp_source.html#l00197">197</a> of file <a class="el" href="_r_d_a5807_8cpp_source.html">RDA5807.cpp</a>.</p>

<p class="reference">Referenced by <a class="el" href="_r_d_a5807_8cpp_source.html#l00273">RDA5807::setup()</a>.</p>

</div>
</div>
<a id="gab97c1c8ad3ab0cd5d2852f712caee0a1" name="gab97c1c8ad3ab0cd5d2852f712caee0a1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab97c1c8ad3ab0cd5d2852f712caee0a1">&#9670;&#160;</a></span>setNewDemodulateMethod()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void RDA5807::setNewDemodulateMethod </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets new demodulate method. It can improve the receiver sensitivity about 1dB. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>true or false </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="_r_d_a5807_8cpp_source.html#l00230">230</a> of file <a class="el" href="_r_d_a5807_8cpp_source.html">RDA5807.cpp</a>.</p>

</div>
</div>
<a id="ga214f631aef72ece69db73c99879c7c46" name="ga214f631aef72ece69db73c99879c7c46"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga214f631aef72ece69db73c99879c7c46">&#9670;&#160;</a></span>powerDown()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void RDA5807::powerDown </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Power the receiver off. </p>

<p class="definition">Definition at line <a class="el" href="_r_d_a5807_8cpp_source.html#l00240">240</a> of file <a class="el" href="_r_d_a5807_8cpp_source.html">RDA5807.cpp</a>.</p>

</div>
</div>
<a id="ga272444216a784ea5317c83783eb2bfe7" name="ga272444216a784ea5317c83783eb2bfe7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga272444216a784ea5317c83783eb2bfe7">&#9670;&#160;</a></span>setup()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void RDA5807::setup </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>clock_frequency</em> = <code><a class="el" href="_r_d_a5807_8h.html#aaaa8a7748321c8739d938babeb67d8e9">CLOCK_32K</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>oscillator_type</em> = <code><a class="el" href="_r_d_a5807_8h.html#a0941eab712587842e5513eb6cd562717">OSCILLATOR_TYPE_PASSIVE</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>rlck_no_calibrate</em> = <code><a class="el" href="_r_d_a5807_8h.html#acf26b27b8292674e78e04908e3c27bff">RLCK_NO_CALIBRATE_MODE_OFF</a></code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Starts the device. </p>
<p>You can select the colck type and the frequency</p>
<p>oscillator type: OSCILLATOR_TYPE_CRYSTAL = passive crystal; OSCILLATOR_TYPE_REFCLK = active crystal or signal generator</p>
<p>Clock type: CLOCK_32K, CLOCK_12M, CLOCK_13M, CLOCK_19_2M, CLOCK_24M, CLOCK_26M and CLOCK_38_4M </p><div class="fragment"><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="_r_d_a5807_8h.html">RDA5807.h</a>&gt;</span> </div>
<div class="line"><a class="code hl_class" href="group___g_a01.html#class_r_d_a5807">RDA5807</a> rx; </div>
<div class="line"><span class="keywordtype">void</span> <a class="code hl_function" href="group___g_a02.html#ga272444216a784ea5317c83783eb2bfe7">setup</a>() {</div>
<div class="line">   rx.<a class="code hl_function" href="group___g_a02.html#ga272444216a784ea5317c83783eb2bfe7">setup</a>(); <span class="comment">// Starts the receiver with default parameters</span></div>
<div class="line">   <span class="comment">// rx.setup(CLOCK_32K, OSCILLATOR_TYPE_ACTIVE);  // 32.768kHz Active Crystal</span></div>
<div class="line">   <span class="comment">// rx.setup(CLOCK_12M, OSCILLATOR_TYPE_PASSIVE); // 12MHz passive crystal </span></div>
<div class="line">   <span class="comment">// rx.setup(CLOCK_38_4M, OSCILLATOR_TYPE_PASSIVE); // 38.4 MHz passive crystal</span></div>
<div class="line">   rx.<a class="code hl_function" href="group___g_a03.html#gad16a6afa9520b77498b17a72c226305a">setFrequency</a>(10390); <span class="comment">// Tunes at 103.9 MHz  </span></div>
<div class="line">}</div>
<div class="line"><span class="keywordtype">void</span> loop() {</div>
<div class="line">}</div>
<div class="ttc" id="a_r_d_a5807_8h_html"><div class="ttname"><a href="_r_d_a5807_8h.html">RDA5807.h</a></div></div>
<div class="ttc" id="agroup___g_a01_html_class_r_d_a5807"><div class="ttname"><a href="group___g_a01.html#class_r_d_a5807">RDA5807</a></div><div class="ttdoc">KT0915 Class.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8h_source.html#l00567">RDA5807.h:568</a></div></div>
<div class="ttc" id="agroup___g_a02_html_ga272444216a784ea5317c83783eb2bfe7"><div class="ttname"><a href="group___g_a02.html#ga272444216a784ea5317c83783eb2bfe7">RDA5807::setup</a></div><div class="ttdeci">void setup(uint8_t clock_frequency=CLOCK_32K, uint8_t oscillator_type=OSCILLATOR_TYPE_PASSIVE, uint8_t rlck_no_calibrate=RLCK_NO_CALIBRATE_MODE_OFF)</div><div class="ttdoc">Starts the device.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00273">RDA5807.cpp:273</a></div></div>
<div class="ttc" id="agroup___g_a03_html_gad16a6afa9520b77498b17a72c226305a"><div class="ttname"><a href="group___g_a03.html#gad16a6afa9520b77498b17a72c226305a">RDA5807::setFrequency</a></div><div class="ttdeci">void setFrequency(uint16_t frequency)</div><div class="ttdoc">Sets the frequency.</div><div class="ttdef"><b>Definition:</b> <a href="_r_d_a5807_8cpp_source.html#l00372">RDA5807.cpp:372</a></div></div>
</div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">clock_frequency</td><td>optional; Clock frequency. Default 32.768 kHz. </td></tr>
    <tr><td class="paramname">oscillator_type</td><td>optional; Sets the Oscillator type (passive or active crystal); default: passive Crystal. </td></tr>
    <tr><td class="paramname">rlck_no_calibrate</td><td>optional; if 0=RCLK clock is always supply; 1=RCLK clock is not always supply when FM work </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="_r_d_a5807_8h.html#a0941eab712587842e5513eb6cd562717" title="Passive Crystal.">OSCILLATOR_TYPE_PASSIVE</a>, <a class="el" href="_r_d_a5807_8h.html#a6231498726197328216bb70c6dfc21aa" title="Reference clock (active crystal oscillator or signal generator)">OSCILLATOR_TYPE_ACTIVE</a>, <a class="el" href="_r_d_a5807_8h.html#a0bc18a7036f4f2571abdb66daa63c918">RLCK_NO_CALIBRATE_MODE_ON</a>, <a class="el" href="_r_d_a5807_8h.html#acf26b27b8292674e78e04908e3c27bff">RLCK_NO_CALIBRATE_MODE_OFF</a> </dd>
<dd>
<a class="el" href="group___g_a02.html#ga30d2b0c4662922df53bcef118663329c" title="Powers the receiver on.">powerUp</a>, <a class="el" href="group___g_a01.html#unionrda__reg02" title="Register 0x02 - Basic setup: RESET configuration;.">rda_reg02</a> </dd></dl>

<p class="definition">Definition at line <a class="el" href="_r_d_a5807_8cpp_source.html#l00273">273</a> of file <a class="el" href="_r_d_a5807_8cpp_source.html">RDA5807.cpp</a>.</p>

<p class="reference">References <a class="el" href="_r_d_a5807_8cpp_source.html#l00197">RDA5807::powerUp()</a>.</p>

</div>
</div>
<a id="gad1d589d43adc89a93c5e07b2d4cb6a4c" name="gad1d589d43adc89a93c5e07b2d4cb6a4c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad1d589d43adc89a93c5e07b2d4cb6a4c">&#9670;&#160;</a></span>getDeviceId()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t RDA5807::getDeviceId </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets the Device identification. </p>
<dl class="section return"><dt>Returns</dt><dd>device number Id </dd></dl>

<p class="definition">Definition at line <a class="el" href="_r_d_a5807_8cpp_source.html#l00291">291</a> of file <a class="el" href="_r_d_a5807_8cpp_source.html">RDA5807.cpp</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
  </ul>
</div>
</body>
</html>
